package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpActivityBoardActionsAddNewAssetPageUtil extends SeleniumPageUtil {
	public final static By ABNA_LINK_ADD_USING_TEMPLATE = By.id("ctl44_btnLikeAsset");
	public final static By ABNA_LINK_ADD_SMS_COVERAGE = By.id("ctl44_btnCoverageAdd");
	public final static By ABNA_LINK_SAVE = By.id("ctl44_btnSave");
	public final static By ABNA_LINK_DELETE = By.id("ctl44_btnDelete");
	public final static By ABNA_LINK_CLOSE = By.id("ctl44_btnDone");
	
	public final static By ABNA_INPUT_END_DATE = By.id("ctl44_txtReqEndDate");
	public final static By ABNA_IMG_END_DATE = By.id("ctl44_imgReqEndDate");
	public final static By ABNA_SELECT_SLA_TERMS = By.id("ctl44_cboSLATermID");
	public final static By ABNA_INPUT_MFG_NAME = By.id("ctl44_txtMfgName");
	public final static By ABNA_TD_MFG_NAME_LIST = By.xpath("//*[@id='aceMfgName_Behavior_completionListElem']/li[4]");
	public final static By ABNA_INPUT_MODEL = By.id("ctl44_txtModelCode");
	public final static By ABNA_TD_MODEL_LIST_3C16700 = By.xpath("//*[@id='aceModelCode_Behavior_completionListElem']/table/tbody/tr[3]/td[1]");
	public final static By ABNA_TD_MODEL_LIST_3C1667 = By.xpath("//*[@id='aceModelCode_Behavior_completionListElem']/table/tbody/tr[1]/td[1]");
	public final static By ABNA_INPUT_SERIAL_NUMBER = By.id("ctl44_txtSerialNumber");
	public final static By ABNA_SELECT_ASSET_TYPE = By.id("ctl44_cboAssetTypeID");
	public final static By ABNA_ASSET_NAME = By.id("ctl44_txtAssetName");
	public final static By ABNA_ASSET_TYPE = By.id("ctl44_txtAssetType");
	public final static By ABNA_INPUT_SITE_ADDRESS = By.id("ctl44_txtAddress");
	public final static By ABNA_TD_SITE_ADDRESS = By.xpath("//*[@id='aceAddress_Behavior_completionListElem']/table/tbody/tr[1]/td[1]");
	public final static By ABNA_SPAN_SITE_ADDRESS = By.id("ctl44_lblAddress");
	
	public static void waitForPageToLoad(){
		SeleniumUtil.waitOnElements(new By[]{
				ABNA_LINK_ADD_USING_TEMPLATE, ABNA_LINK_ADD_SMS_COVERAGE, ABNA_LINK_SAVE, ABNA_LINK_DELETE, ABNA_LINK_CLOSE,
				ABNA_IMG_END_DATE, ABNA_SELECT_SLA_TERMS
		});
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABNA_LINK_ADD_USING_TEMPLATE));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABNA_LINK_ADD_SMS_COVERAGE));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABNA_LINK_SAVE));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABNA_LINK_DELETE));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABNA_LINK_CLOSE));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABNA_IMG_END_DATE));
		SeleniumUtil.isDisplayed(SeleniumUtil.getCachedElement(ABNA_SELECT_SLA_TERMS));
	}
}
